import request from '@/utils/request'

// 查询体检套餐主列表
export function listPackage(query) {
  return request({
    url: '/system/package/list',
    method: 'get',
    params: query
  })
}

// 查询体检套餐主详细
export function getPackage(id) {
  return request({
    url: '/system/package/' + id,
    method: 'get'
  })
}

// 新增体检套餐主
export function addPackage(data) {
  return request({
    url: '/system/package',
    method: 'post',
    data: data
  })
}

// 修改体检套餐主
export function updatePackage(data) {
  return request({
    url: '/system/package',
    method: 'put',
    data: data
  })
}

// 删除体检套餐主
export function delPackage(id) {
  return request({
    url: '/system/package/' + id,
    method: 'delete'
  })
}
// 查询所有项目
export function getallitem() {
  return request({
    url: '/system/package/getallitem',
    method: 'get'
  })
}
//根据套餐名称删除套餐
export function delpackagebyname(name) {
  return request({
    url: '/system/package/me/delpackagebyname',
    method: 'get',
    params: { name: name }
  })
}
//获取所有院区
export function listCampus() {
  return request({
    url: '/system/package/listCampus',
    method: 'get'
  })
}
//根据套餐名称获取套餐
export function getpackagebyname(name) {
  return request({
    url: '/system/package/getpackagebyname',
    method: 'get',
    params: { name: name }
  })
}